package com.test.card.repository;

import com.test.card.bean.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserInfoRepository {

    @Insert("insert into user_info(user_name,phone,card_no,point,create_time) values(#{userName},#{phone},#{cardNo},#{point},#{createTime})")
    Integer save(UserInfo users);

    @Select("select count(phone) from user_info where card_no = #{cardNo}")
    Integer findBycardNo(String cardNo);
}
